<template>
	<view>
		<u-overlay :show="$store.state.permissions.isPermissionAlertShow">
			<view class="permission-alert" id="permission-alert" v-show="$store.state.permissions.isPermissionAlertShow">
				<text class="title" style="font-size: 20px;margin-bottom: 10px;margin-top: 5px; display: block;">{{ permission[$store.state.permissions.permissionType].title || '' }}</text>
				<text class="text" style="color: darkgray;">{{ permission[$store.state.permissions.permissionType || ''].text}}</text>
			</view>
		</u-overlay>
	</view>
</template>

<script>
	export default {
		name:"permissionPopup",
		data() {
			return {
				permission:{
					'': {title: '', text: ''},
					"android.permission.WRITE_EXTERNAL_STORAGE":{
						title: '储存权限使用说明',
						text: "'莲众'将申请访问手机存储功能，是为了存储和访问相机、图片等相关数据内容"
					},
					"android.permission.CAMERA":{
						title: '储存权限使用说明',
						text: "'莲众'将申请访问手机摄像头功能，是为了向您提供正常的照片拍摄功能"
					},
					"android.permission.ACCESS_COARSE_LOCATION":{
						title: '储存权限使用说明',
						text: "'莲众'将申请访问手机位置服务，是为了向您提供定位以及导航类服务"
					},
					"android.permission.ACCESS_FINE_LOCATION":{
						title: '储存权限使用说明',
						text: "'莲众'将申请访问手机位置服务，是为了向您提供定位以及导航类服务"
					},
				}
			};
		}
	}
</script>

<style scoped>
	.content{
		
	}
	.permission-alert {
		position: fixed;
		top: 140rpx;
		width: 650rpx;
		height: 200rpx;
		margin: 20rpx 40rpx;
		z-index: 3;
		border-radius: 5px;
		transition-property: transform;
		transition-duration: 200ms;
		background-color: white;
		padding: 10rpx;
		/* background-color: aqua; */
	}
	.title{
		font-family: PingFangSC, PingFang SC;
		font-weight: 500;
		font-size: 32rpx;
		color: #111111;
		line-height: 44rpx;
		text-align: left;
		font-style: normal;
	}
	.text{
		font-family: PingFangSC, PingFang SC;
		font-weight: 600;
		font-size: 24rpx;
		color: #323232;
		line-height: 34rpx;
		text-align: left;
		font-style: normal;
	}
</style>